const {
    Mysql
} = require('../tools/utils');
module.exports = async (ctx) => {
    
    let {
        vid,
        id,
        videoUrl
    } = ctx.request.body;
    let sql = `UPDATE tv SET tv.videoUrl = '${videoUrl}' WHERE vid=${Number(vid)} AND id=${Number(id)}`
    let res = await Mysql(sql);
    if (res) {
        ctx.state.data = {
            msg: 'مۇۋەپپەقىيەتلىك يېڭىلاندى',
            code: '001'
        }
    }
}